package com.atguigu.lease.common.exception;

import com.atguigu.lease.common.result.ResultCodeEnum;
import lombok.Data;

/**
 * ClassName: LeaseException
 * Package: com.atguigu.lease.common.exception
 * Description:
 *
 * @author: fu-wang
 * @create: 2024/10/1 17:52
 * version: 1.0
 */
@Data
public class LeaseException extends RuntimeException {
    private ResultCodeEnum resultCodeEnum;

    public LeaseException(String message) {
        super(message);
    }

    public LeaseException(ResultCodeEnum resultCodeEnum) {
        super(resultCodeEnum.getMessage());
        this.resultCodeEnum = resultCodeEnum;
    }
}
